Files @ 958b890f7982
Branch filter:

Location: yaah/yaah.completion

Dennis Fink
added last_updated to search
_yaah() {

    local cur prev opts
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
    opts="-h --help -c --check -s --search -v --verbose -q --quiet --version --downloaddir -d"

    if [[ ${prev} == "-d" ]]; then
        COMPREPLY=( $(compgen -d -- ${cur}) )
        return 0
    fi
    if [[ ${prev} == "--downloaddir" ]]; then
        COMPREPLY=( $(compgen -d -- ${cur}) )
        return 0
    fi
    if [[ ${cur} == -* ]]; then
        COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
        return 0
    fi
}
complete -F _yaah yaah