
__contains_word () {
		local w word=$1; shift
		for w in "$@"; do
				[[ $w = "$word" ]] && return
		done
}

_voxl_joystick_server(){

	local OPTS=('--debug --debug-state')
	local OPTS_SHORT=('-d -s')

	COMPREPLY=()

	if [ "$COMP_CWORD" -eq 1 ]; then
        COMPREPLY=( $(compgen -W '${OPTS}' -- ${COMP_WORDS[COMP_CWORD]}) )
        return 0
	fi

}

complete -F _voxl_joystick_server voxl-joystick-server
