microsoft / knack

Knack - A Python command line interface framework
https://pypi.python.org/pypi/knack
MIT License
348 stars 95 forks source link

TSV output doesn't include headers #234

Open SaarasM opened 3 years ago

SaarasM commented 3 years ago

Currently tsv output is the only output type that doesn't include headers, despite tsv files commonly having headers. Is there a reason to remove headers for this output type?

C:\Users\smehan>az version -o json
{
  "azure-cli": "2.9.1",
  "azure-cli-command-modules-nspkg": "2.0.3",
  "azure-cli-core": "2.9.1",
  "azure-cli-nspkg": "3.0.4",
  "azure-cli-telemetry": "1.0.4",
  "extensions": {
    "azure-devops": "0.18.0",
    "interactive": "0.4.4"
  }
}

C:\Users\smehan>az version -o jsonc
{
  "azure-cli": "2.9.1",
  "azure-cli-command-modules-nspkg": "2.0.3",
  "azure-cli-core": "2.9.1",
  "azure-cli-nspkg": "3.0.4",
  "azure-cli-telemetry": "1.0.4",
  "extensions": {
    "azure-devops": "0.18.0",
    "interactive": "0.4.4"
  }
}

C:\Users\smehan>az version -o none

C:\Users\smehan>az version -o table
Azure-cli    Azure-cli-command-modules-nspkg    Azure-cli-core    Azure-cli-nspkg    Azure-cli-telemetry
-----------  ---------------------------------  ----------------  -----------------  ---------------------
2.9.1        2.0.3                              2.9.1             3.0.4              1.0.4

C:\Users\smehan>az version -o yaml
azure-cli: 2.9.1
azure-cli-command-modules-nspkg: 2.0.3
azure-cli-core: 2.9.1
azure-cli-nspkg: 3.0.4
azure-cli-telemetry: 1.0.4
extensions:
  azure-devops: 0.18.0
  interactive: 0.4.4

C:\Users\smehan>az version -o yamlc
azure-cli: 2.9.1
azure-cli-command-modules-nspkg: 2.0.3
azure-cli-core: 2.9.1
azure-cli-nspkg: 3.0.4
azure-cli-telemetry: 1.0.4
extensions:
  azure-devops: 0.18.0
  interactive: 0.4.4

C:\Users\smehan>az version -o tsv
2.9.1   2.0.3   2.9.1   3.0.4   1.0.4                                         <-- No headers