_service_module() {
	local cur

	COMPREPLY=()
	cur=${COMP_WORDS[COMP_CWORD]}

	if [[ "$UID" == '0' ]]; then
		IFS=$'\n' words=( /etc/rc.d/* )
	else
		IFS=$'\n' words=( $HOME/.watchman/init.d/* )
	fi

	COMPREPLY=( $(compgen -W "${words[*]##*/}" -- "$cur") )
}
complete -F _service_module service watchman
