- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 3.14.255.181
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 8.2.26
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/bash-completion/completions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/bash-completion/completions/clevis
# bash completion support for clevis.

_clevis()
{
    local dir prev cur field
    dir=$(dirname "$(command -v clevis)")
    prev=${COMP_WORDS[COMP_CWORD-1]}
    cur=${COMP_WORDS[COMP_CWORD]}
    field=$((COMP_CWORD + 1))

    case "${prev}" in
    -d)
        cur=${cur:=/dev/}
        _filedir
        return
        ;;
    -k)
        _filedir
        return
        ;;
    esac

    local name suggestions
    if [[ "${COMP_WORDS[COMP_CWORD-1]}" == "clevis" ]]; then
        name="clevis-*"
    fi

    if [[ "${COMP_WORDS[COMP_CWORD-2]}" == "clevis" ]]; then
        name="clevis-${COMP_WORDS[COMP_CWORD-1]}-*"
    fi

    suggestions=
    if [[ -n "${name}" ]]; then
        suggestions=$(find "${dir}" -name "${name}" -executable \
                      | cut -d '-' -f"${field}" | sort -u)

        local word
        if [[ -n "${cur}" ]]; then
            suggestions=$(for word in "${suggestions[@]}"; do \
                          echo "${word}" | grep -- "${cur}"; done)
        fi
    fi

    COMPREPLY=($(compgen -W "${suggestions}" -- "${cur}"))
}

complete -F _clevis clevis
# vim: set ts=8 shiftwidth=4 softtabstop=4 expandtab smarttab colorcolumn=80:

Youez - 2016 - github.com/yon3zu
LinuXploit