Skip to content

[Feature]: Output format option with -o/--output parameter instead of --json/--yaml #94

@rverchere

Description

@rverchere

Is there an existing issue for this?

  • I have searched the existing issues

Product concerned

All

Feature description

Hi,

the ovhcloud CLI supports 2 output options:

  -j, --json            Output in JSON
  -y, --yaml            Output in YAML

As it is mutually exclusive, and to be more "compliant" with other CLI tools, I suggest using the -o or --output option:

ovhcloud -o json
ovhcloud --outpout json
ovhcloud -o yaml
ovhcloud --output yaml

Example for kubectl:

   -o, --output='':
        Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath,
        jsonpath-as-json, jsonpath-file, custom-columns, custom-columns-file, wide). See custom columns
        [https://kubernetes.io/docs/reference/kubectl/#custom-columns], golang template
        [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template
        [https://kubernetes.io/docs/reference/kubectl/jsonpath/].

Example for helm:

-o, --output format        prints the output in the specified format. Allowed values: table, json, yaml (default table)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions