NineSec Team Shell
Server IP : 184.107.3.203  /  Your IP : 216.73.216.51
Web Server : Apache
System : Linux dedicated2.avenfashion.com.ph 4.18.0-553.40.1.el8_10.x86_64 #1 SMP Mon Feb 10 12:11:18 EST 2025 x86_64
User : adminteladeoro ( 1015)
PHP Version : 8.2.28
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/bash-completion/completions/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/bash-completion/completions/dpkg-query
# This function is required by _dpkg and _dpkg-reconfigure -*- shell-script -*-

_have grep-status && {
_comp_dpkg_installed_packages()
{
    grep-status -P -e "^$1" -a -FStatus 'install ok installed' -n -s Package
}
} || {
_comp_dpkg_installed_packages()
{
    command grep -A 1 "Package: $1" /var/lib/dpkg/status 2>/dev/null | \
        command grep -B 1 -Ee "ok installed|half-installed|unpacked| \
            half-configured" \
            -Ee "^Essential: yes" | \
        awk "/Package: $1/ { print \$2 }" 2>/dev/null
}
}

_have grep-status && {
_comp_dpkg_purgeable_packages()
{
    grep-status -P -e "^$1" -a -FStatus 'install ok installed' -o -FStatus 'deinstall ok config-files' -n -s Package
}
} || {
_comp_dpkg_purgeable_packages()
{
    command grep -A 1 "Package: $1" /var/lib/dpkg/status 2>/dev/null | \
        command grep -B 1 -Ee "ok installed|half-installed|unpacked| \
            half-configured|config-files" \
            -Ee "^Essential: yes" | \
        awk "/Package: $1/ { print \$2 }" 2>/dev/null
}
}

# Debian dpkg(8) completion
#
_dpkg()
{
    local cur prev words cword split
    _init_completion -s || return

    local i=$cword

    # find the last option flag
    if [[ $cur != -* ]]; then
        while [[ $prev != -* && $i -ne 1 ]]; do
            i=$((i-1))
            prev=${words[i-1]}
        done
    fi

    case $prev in
        -c|-i|-A|-I|-f|-e|-x|-X|-W|--install|--unpack|--record-avail| \
        --contents|--info|--fsys-tarfile|--field|--control|--extract| \
        --show)
            _filedir '?(u|d)deb'
            return
            ;;
        -b|--build)
            _filedir -d
            return
            ;;
        -s|-p|-l|--status|--print-avail|--list)
            COMPREPLY=( $( apt-cache pkgnames "$cur" 2>/dev/null ) )
            return
            ;;
        -S|--search)
            _filedir
            return
            ;;
        -r|--remove)
            COMPREPLY=( $( _comp_dpkg_installed_packages "$cur" ) )
            return
            ;;
        -L|-P|--listfiles|--purge)
            COMPREPLY=( $( _comp_dpkg_purgeable_packages "$cur" ) )
            return
            ;;
    esac

    $split && return

    COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
    [[ $COMPREPLY == *= ]] && compopt -o nospace
} &&
complete -F _dpkg dpkg dpkg-deb dpkg-query

# Debian GNU dpkg-reconfigure(8) completion
#
_dpkg_reconfigure()
{
    local cur prev words cword
    _init_completion || return

    local opt

    case $prev in
        -f|--frontend)
            opt=( $( printf '%s\n' /usr/share/perl5/Debconf/FrontEnd/* ) )
            opt=( ${opt[@]##*/} )
            opt=( ${opt[@]%.pm} )
            COMPREPLY=( $( compgen -W '${opt[@]}' -- "$cur" ) )
            return
            ;;
        -p|--priority)
            COMPREPLY=( $( compgen -W 'low medium high critical' -- "$cur" ) )
            return
            ;;
    esac

    if [[ "$cur" == -* ]]; then
        COMPREPLY=( $(compgen -W '--frontend --priority --all --unseen-only
            --help --showold --force --terse' -- "$cur" ) )
    else
        COMPREPLY=( $( _comp_dpkg_installed_packages "$cur" ) )
    fi
} &&
complete -F _dpkg_reconfigure -o default dpkg-reconfigure

# ex: filetype=sh

NineSec Team - 2022