_icingacli_completion()
{
  local cur opts
  opts="${COMP_WORDS[*]}"
  cur="${COMP_WORDS[COMP_CWORD]}"
  COMPREPLY=($($opts --autocomplete --autoindex $COMP_CWORD < /dev/null))
  return 0
}

complete -F _icingacli_completion icingacli