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

_voxl_configure_joystick_server(){

	local OPTS=('--help --disable --factory_enable --factory_enable_fiber --wizard')
	local OPTS_SHORT=('-h -d -f -I -w')

	COMPREPLY=()

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

}

complete -F _voxl_configure_joystick_server voxl-configure-joystick-server