# Copyright: (c) Huawei Technologies Co., Ltd. 2021-2023. All rights reserved.
if type compdef &>/dev/null; then
  __completeAgcliCommand () {
    SHELL=zsh
    local reply
    local si=$IFS

    IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" agcli completion -- "${words[@]}"))
    IFS=$si

    if [ "$reply" = "__agcli_complete_files__" ]; then
      _files
    else
      _describe 'values' reply
    fi
  }
  compdef __completeAgcliCommand agcli
fi