#compdef pypkg

_pypkg () {
  local -a reply
  if [[ ${CURRENT} = 2 ]]; then
    reply=(
      'find:find package path' \
      'list:get package list' \
      'help:show usage'
      )
  else
    case ${=${(s: :)words}[2]} in
    find)
      opts=`pypkg list`
      reply=(${=opts})
    ;;
    esac
  fi
  _describe -t pypkg_completion 'pypkg_completion' reply
}
