#!/bin/bash

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

_voxl_configure_vtx(){

	local OPTS=('--help --list --frequency --active_profile_idx --mcs --source --power --power-mw --toggle --enable --disable --factory_enable --factory_enable_lte --factory_enable_fiber --factory_enable_doodle --factory_enable_dtc --wizard --d0008_v4 --d0008_v5 --d0013 --d0020_strike')
	local OPTS_SHORT=('-h -l -f -a -m -s -p -P -t -e -d -f -L -D -w')

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

}

complete -F _voxl_configure_vtx voxl-configure-vtx
