Skip to content

Add a flag to prettify output  #221

@csjones

Description

@csjones

🗣 Context

When outputting with the format --csv, --json, or --yaml

💬 Narrative

As a user
I want the command output to be easily parsable by me
So that I can quickly debug a command result

📝 Notes

Idea originates from #220 where it was discussed to have output of all commands is parsable by default.

🎨 Design

Provide design example, screenshot, text input/output etc

asc certificates list --json

{"example":{"sample":[{"example":"sample","random_value":8.95}]}}

asc certificates list --pretty --json

{
   "example":{
      "sample":[
         {
            "example":"sample",
            "random_value":8.95
         }
      ]
   }
}

asc certificates list --csv

CERT,DATESMPL,EXAMPLE,SAMPLE
M109UYTGSF007,08/01/2020 13:51:00,true,false
M109UYTGSF007,08/02/2020 13:56:01,false,false
M109UYTGSF007,08/03/2020 13:55:02,false,false
M109UYTGSF007,08/04/2020 13:54:03,true,true
M109UYTGSF007,08/05/2020 13:55:04,false,true

asc certificates list --pretty --csv

    CERT               DATESMPL            EXAMPLE     SAMPLE
M109UYTGSF007    08/01/2020 13:51:00         true       false
M109UYTGSF007    08/02/2020 13:56:01        false       false
M109UYTGSF007    08/03/2020 13:55:02        false       false
M109UYTGSF007    08/04/2020 13:54:03         true        true
M109UYTGSF007    08/05/2020 13:55:04        false        true

✅ Acceptance Criteria

GIVEN there is output that can be prettified with a command
WHEN the command is executed with --pretty
THEN the output is formatted for easy readability

🚫 Out of Scope

The scope making command output pretty is limited to --csv, --json, or --yaml.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions