_minstaller() {
  local cur prev words cword split
  _init_completion || return

  case "$cur" in
    -*)
      COMPREPLY=($(compgen -W '--help --verbose' -- "$cur"))
      [[ "$COMPREPLY" == *= ]] && compopt -o nospace
      ;;
    *)
      words=$(minstaller --help | sed -e '1,/commands:/d' -e '/^options:/,$d' \
        | awk '/ [a-z]+/ { print $1 }')
      COMPREPLY=($(compgen -W '$words' -- "$cur"))
      ;;
  esac
}
complete -F _minstaller minstaller
