That would be really cool and useful, but this is an issue for bash completion not for Monit.
I was not so clear.
When I type stop name<TAB> a list of services should appear.
Bash/ZSH calls a special predefined option. E.g. monit completions --line="$COMP_LINE" --point="$COMP_POINT"
and substitutes the whole line for $COMP_LINE and the position in $COMP_POINT
Then monit should output a list of running services. For start name<TAB> a list of stopped services.
thanks Victor :) We'll try to improve the completion support - the "monit summary" which we recommended an is used in the referred script as well, requires the monit daemon to be running.
Alternative could be to use 'monit -vIt' which just parses the configuration file and dumps the configuration ... will see if we can find some better way which won't require post-processing the monit output for completion
Fixed: Issue #123: Added a bash completion script for monit command-line. The script is not installed by default, if you want to enable the bash completion for monit, copy system/bash/monit file to /etc/bash_completion.d/ directory or similar (depends on your bash installation).