API-CLI

 view release on metacpan or  search on metacpan

examples/bash/digitaloceancl.bash  view on Meta::CPAN

        esac

        ;;
        esac
      ;;
      POST)
        FLAGS+=()
        OPTIONS+=()
        __digitaloceancl_handle_options_flags
        case $INDEX in

        1)
            __comp_current_options || return
            __digitaloceancl_dynamic_comp 'commands' '/droplets/:id/actions'$'\t''Trigger droplet action'

        ;;
        *)
        # subcmds
        case ${MYWORDS[1]} in
          /droplets/:id/actions)
            FLAGS+=()
            OPTIONS+=()
            __digitaloceancl_handle_options_flags
            __comp_current_options true || return # no subcmds, no params/opts
          ;;
        esac

        ;;
        esac
      ;;
      _meta)
        FLAGS+=()
        OPTIONS+=()
        __digitaloceancl_handle_options_flags
        case $INDEX in

        1)
            __comp_current_options || return
            __digitaloceancl_dynamic_comp 'commands' 'completion'$'\t''Shell completion functions'$'\n''pod'$'\t''Pod documentation'

        ;;
        *)
        # subcmds
        case ${MYWORDS[1]} in
          completion)
            FLAGS+=()
            OPTIONS+=()
            __digitaloceancl_handle_options_flags
            case $INDEX in

            2)
                __comp_current_options || return
                __digitaloceancl_dynamic_comp 'commands' 'generate'$'\t''Generate self completion'

            ;;
            *)
            # subcmds
            case ${MYWORDS[2]} in
              generate)
                FLAGS+=('--zsh' 'for zsh' '--bash' 'for bash')
                OPTIONS+=('--name' 'name of the program (optional, override name in spec)')
                __digitaloceancl_handle_options_flags
                  case $INDEX in
                  *)
                    __comp_current_options true || return # after parameters
                    case ${MYWORDS[$INDEX-1]} in
                      --data-file)
                      ;;
                      --name)
                      ;;

                    esac
                    ;;
                esac
              ;;
            esac

            ;;
            esac
          ;;
          pod)
            FLAGS+=()
            OPTIONS+=()
            __digitaloceancl_handle_options_flags
            case $INDEX in

            2)
                __comp_current_options || return
                __digitaloceancl_dynamic_comp 'commands' 'generate'$'\t''Generate self pod'

            ;;
            *)
            # subcmds
            case ${MYWORDS[2]} in
              generate)
                FLAGS+=()
                OPTIONS+=()
                __digitaloceancl_handle_options_flags
                __comp_current_options true || return # no subcmds, no params/opts
              ;;
            esac

            ;;
            esac
          ;;
        esac

        ;;
        esac
      ;;
      help)
        FLAGS+=('--all' '')
        OPTIONS+=()
        __digitaloceancl_handle_options_flags
        case $INDEX in

        1)
            __comp_current_options || return
            __digitaloceancl_dynamic_comp 'commands' 'GET'$'\n''POST'

        ;;



( run in 0.489 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )