Skip to content

Add a headers row to the output from all appropriate Chocolatey CLI commands when using --limit-output option #2591

@corbob

Description

@corbob

When you use --limit-output or -r you can pipe the output to ConvertFrom-Csv and provide -Delimiter '|' to get a PowerShell object. In order to get a proper one, you need to also pass in -Header. It would be beneficial to output a header row for the user so they don't need this.

The output I envision for choco list -lo -r would change from:

chocolatey|0.12.1

to (something like):

PackageId|Version
chocolatey|0.12.1`

In order to make this change in a way to not break existing scripts/workflows, I would suggest adding a feature alwaysIncludeHeaders that defaults to disabled with the possibility of defaulting it to enabled in a future version, as well as introduce a --include-headers option for per command control.

Metadata

Metadata

Assignees

Labels

5 - ReleasedImprovementIssues that enhances existing functionality, or adds new features

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions