MOON
Server: Apache
System: Linux smtp.modiva.org 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64
User: rtbrisc (1005)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //usr/share/zsh/site-functions/_mdapt
#compdef mdatp

local -a subcmds

_arguments -C \
    '*: :->command'

case $state in
    (command)
        local size
        local curr=1

        size=${#words[@]}

        if [[ "$words[(($CURRENT-1))]" == "--path" ]] ; then
            _alternative \
                'files:filename:_files'
        else
            local ret
            local json_command=[
            for word in $words; do
                [[ $curr -ne 1 ]]
                [[ $curr -ne $size ]]
                [[ $curr -ne 1  || $curr -ne $size ]]
                if [[ $curr -ne 1  && $curr -ne $size ]] ; then
                    if [[ $curr -ne 2 ]] ; then
                        json_command+=,
                    fi
                    json_command+=\"$word\"
                else
                    if [[ ${word} = --* ]];  then
                        json_command+=,\"--\"
                    fi
                fi
                ((curr++))
            done
            json_command+=]

            subcmds=(${(f)"$(mdatp helper --command $json_command --type zsh 2>/dev/null)"})

            _describe 'command' subcmds
        fi
    ;;
esac