#!/bin/bash

_xclogparser() {
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
    COMPREPLY=()
    opts="-h --help parse dump manifest version help"
    if [[ $COMP_CWORD == "1" ]]; then
        COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
        return
    fi
    case ${COMP_WORDS[1]} in
        (parse)
            _xclogparser_parse 2
            return
            ;;
        (dump)
            _xclogparser_dump 2
            return
            ;;
        (manifest)
            _xclogparser_manifest 2
            return
            ;;
        (version)
            _xclogparser_version 2
            return
            ;;
        (help)
            _xclogparser_help 2
            return
            ;;
    esac
    COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
}
_xclogparser_parse() {
    opts="--file --derived_data --project --workspace --xcodeproj --reporter --machine_name --redacted --without_build_specific_information --strictProjectName --output --rootOutput --omit_warnings --omit_notes --trunc_large_issues -h --help"
    if [[ $COMP_CWORD == "$1" ]]; then
        COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
        return
    fi
    case $prev in
        --file)

            return
        ;;
        --derived_data)

            return
        ;;
        --project)

            return
        ;;
        --workspace)

            return
        ;;
        --xcodeproj)

            return
        ;;
        --reporter)

            return
        ;;
        --machine_name)

            return
        ;;
        --output)

            return
        ;;
        --rootOutput)

            return
        ;;
    esac
    COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
}
_xclogparser_dump() {
    opts="--file --derived_data --project --workspace --xcodeproj --redacted --without_build_specific_information --strictProjectName --output -h --help"
    if [[ $COMP_CWORD == "$1" ]]; then
        COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
        return
    fi
    case $prev in
        --file)

            return
        ;;
        --derived_data)

            return
        ;;
        --project)

            return
        ;;
        --workspace)

            return
        ;;
        --xcodeproj)

            return
        ;;
        --output)

            return
        ;;
    esac
    COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
}
_xclogparser_manifest() {
    opts="--long_manifest --derived_data --project --workspace --xcodeproj --strictProjectName --output -h --help"
    if [[ $COMP_CWORD == "$1" ]]; then
        COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
        return
    fi
    case $prev in
        --long_manifest)

            return
        ;;
        --derived_data)

            return
        ;;
        --project)

            return
        ;;
        --workspace)

            return
        ;;
        --xcodeproj)

            return
        ;;
        --output)

            return
        ;;
    esac
    COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
}
_xclogparser_version() {
    opts="-h --help"
    if [[ $COMP_CWORD == "$1" ]]; then
        COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
        return
    fi
    COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
}
_xclogparser_help() {
    opts=""
    if [[ $COMP_CWORD == "$1" ]]; then
        COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
        return
    fi
    COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
}


complete -F _xclogparser xclogparser
