AnonSec Team
Server IP : 161.35.85.9  /  Your IP : 216.73.217.134
Web Server : nginx/1.30.1
System : Linux cheapdeb-ams3 7.0.9+deb14-amd64 #1 SMP PREEMPT_DYNAMIC Debian 7.0.9-1 (2026-05-22) x86_64
User : root ( 0)
PHP Version : 8.2.18
Disable Function : NONE
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/rdict
# dict(1) completion                                       -*- shell-script -*-

_comp_cmd_dict__compgen_dictdata()
{
    # shellcheck disable=SC2086
    _comp_compgen_split -- "$(
        "$@" 2>/dev/null | command sed -ne \
            's/^[[:blank:]]\{1,\}\([^[:blank:]]*\).*$/\1/p'
    )"
}

_comp_cmd_dict()
{
    local cur prev words cword comp_args
    _comp_initialize -- "$@" || return

    local -a dict_command=("$1")
    local host="" port="" db i

    local noargopts='!(-*|*[hpdis]*)'
    for ((i = 1; i < cword; i++)); do
        # shellcheck disable=SC2254
        case ${words[i]} in
            --host | -${noargopts}h)
                host=${words[++i]}
                [[ $host ]] && dict_command+=(-h "$host")
                ;;
            --port | -${noargopts}p)
                port=${words[++i]}
                [[ $port ]] && dict_command+=(-p "$port")
                ;;
            --database | -${noargopts}d)
                db=${words[++i]}
                [[ $db ]] && dict_command+=(-d "$db")
                ;;
        esac
    done

    if [[ $cur == -* ]]; then
        _comp_compgen_help
        return
    fi

    # shellcheck disable=SC2254
    case $prev in
        --database | -info | -${noargopts}[di])
            _comp_cmd_dict__compgen_dictdata "${dict_command[@]}" -D
            return
            ;;
        --strategy | -${noargopts}s)
            _comp_cmd_dict__compgen_dictdata "${dict_command[@]}" -S
            return
            ;;
    esac

    local dictfile=/usr/share/dict/words
    if [[ -r $dictfile ]]; then
        # Dictfile may be too large for practical compgen -W usage, so narrow
        # it down with grep if $cur looks like something that's safe to embed
        # in a pattern instead.
        if [[ $cur == +([-A-Za-z0-9/.]) ]]; then
            _comp_compgen_split -- "$(
                command grep "^${cur//./\\.}" "$dictfile"
            )"
        else
            _comp_compgen_split -- "$(cat "$dictfile")"
        fi
    fi
} &&
    complete -F _comp_cmd_dict -o default dict rdict

# ex: filetype=sh

AnonSec - 2021