# add this in your bashrc:

# todo: add this to go-arg as a 'hidden' go-arg option --bash
#
# Put the below in the file: ~/.local/share/bash-completion/completions/go-deb
#
# todo: make this output work/parse with:
# complete -C go-deb --bash go

_go-deb_complete()
{
	# sets local to this func vars
	local cur prev all
	cur=${COMP_WORDS[COMP_CWORD]}
	# prev=${COMP_WORDS[COMP_CWORD-1]}
	all=${COMP_WORDS[@]}

	# this is where we generate the go-arg output
        GOARGS=$(go-deb --auto-complete \'$cur\' $all)

	# this compares the command line input from the user
	# to whatever strings we output
        COMPREPLY=( $(compgen -W "$GOARGS" -- $cur) )  # THIS WORKS
	return 0
}
complete -F _go-deb_complete go-deb

# copy and paste the above into your bash shell should work

