#!/bin/bash

_ufo() {
    COMPREPLY=()
    local CURR="${COMP_WORDS[COMP_CWORD]}"
    local FIRST="${COMP_WORDS[1]}"
    if [[ ${COMP_CWORD} -eq 1 && ${CURR} == -* ]]; then
        COMPREPLY=(
            $(compgen -W "--help --version --make-config -t" -- ${CURR})
        )
        return 0
    elif [[ ${FIRST} == --* ]]; then
        compopt +o default
        COMPREPLY=( )
        return 0
    elif [[ ${CURR} == -* ]]; then
        COMPREPLY=( $(compgen -W "-t" -- ${CURR}) )
        return 0
    fi
}

complete -o default -F _ufo ufo
