hello 404 Not Found
Al-HUWAITI Shell
Al-huwaiti


Server : Apache/2.4.52 (Ubuntu)
System : Linux HAN2 5.15.0-185-generic #195-Ubuntu SMP Fri Jun 19 17:11:50 UTC 2026 x86_64
User : servadmin ( 1000)
PHP Version : 8.1.2-1ubuntu2.25
Disable Function : NONE
Directory :  /usr/share/bash-completion/completions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/bash-completion/completions/mdatp
#/usr/bin/env bash

__mdatp__suggestion()
{
    local json_command=[

    END=$((COMP_CWORD-1))
    for i in $(seq 0 $END)
    do
        case $i in
            0)
                #it is always mdatp - skip
            ;;
            1)
                json_command+=\"${COMP_WORDS[i]}\"
            ;;
            *)
                json_command+=,\"${COMP_WORDS[i]}\"
            ;;
        esac
    done

    # Last element starts with "--", for optional parametters completion
    if [[ ${COMP_WORDS[COMP_CWORD]} = --* ]];  then
        json_command+=,\"--\"
    fi
    json_command+=]

    echo "$(mdatp helper --command $json_command --type bash 2>/dev/null)"
}

__mdatp__completion()
{
    local cur prev

    cur=${COMP_WORDS[COMP_CWORD]}
    prev=${COMP_WORDS[COMP_CWORD-1]}

	case "${prev}" in
	"--path")
        local suggestions=($(compgen -o filenames -A file -- ${cur}))
        COMPREPLY=("${suggestions[@]}")
		;;
	*)
        n="$(__mdatp__suggestion)"
        if [ -n "${n}" ]
        then
            local suggestions=($(compgen -W "${n}" -- ${cur}))
            COMPREPLY=("${suggestions[@]}")
        fi
        ;;
	esac
}

complete -F __mdatp__completion mdatp

Al-HUWAITI Shell