%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/share/bash-completion/completions/
Upload File :
Create Path :
Current File : //usr/share/bash-completion/completions/apport-collect

# Apport bash-completion for apport-collect

_apport-collect ()
{
    local cur prev

    COMPREPLY=()
    cur=`_get_cword`
    prev=${COMP_WORDS[COMP_CWORD-1]}

    case "$prev" in
    apport-collect)
        COMPREPLY=( $( compgen -W "-p --package --tag" -- $cur) )

    ;;
    -p | --package)
        # list package names
        COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )

    ;;
    --tag)
        # standalone parameter
        return 0
    ;;
    *)
        # only complete -p/--package once
        if [[ "${COMP_WORDS[*]}" =~ .*\ -p.* || "${COMP_WORDS[*]}" =~ .*--package.* ]]; then
            COMPREPLY=( $( compgen -W "--tag" -- $cur) )
        else
            COMPREPLY=( $( compgen -W "-p --package --tag" -- $cur) )
        fi

    ;;
    esac
}

complete -F _apport-collect apport-collect

Zerion Mini Shell 1.0