_script()
{
  _script_commands=$(<YOUR_PIALERT_PATH>/back/pialert-cli arg_list)

  local cur
  COMPREPLY=()
  cur="${COMP_WORDS[COMP_CWORD]}"
  COMPREPLY=( $(compgen -W "${_script_commands}" -- ${cur}) )

  return 0
}
complete -o nospace -F _script ./pialert-cli
