Source

imagepaste / imp.bash_completion.sh

Full commit
#
# imp bash completion
#

_imp()
{
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    subcommands_1="fastpic flashtux imagebin ipicture ompldr radikal"

    if [[ ${COMP_CWORD} == 1 ]] ; then # complete first word
        COMPREPLY=( $(compgen -W "${subcommands_1}" -- ${cur}) )
        return 0
    fi

    if [[ ${COMP_CWORD} == 2 ]] ; then
        COMPREPLY=( $(compgen -d -f -- ${cur}) )
        return 0
    fi

    return 0
}

complete -F _imp imp