winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Parsing Request/Issue - Two Spaces instead of One

Open narabug opened this issue 3 years ago • 3 comments

Description of the new feature / enhancement

If you returned data with two spaces between objects instead of a single space, we could easily parse the output. With only one space, parsing cannot consistently return accurate results.

For example: winget Ouput

parsed because you are only appending a single space at the end of a value in the string, parsing becomes exceptionally difficult.

Proposed technical implementation details

Appending two space characters would make parsing this output significantly easier and more accurate.

narabug avatar Mar 11 '22 02:03 narabug

I'll keep this Issue open for now, but I think we're looking at a different approach. For PowerShell we're going to call the COM API to get "rich" objects back. We're likely to have something in the CLI like "--json" to give output that is easier to format.

denelon avatar Mar 11 '22 16:03 denelon

Is there an update to when there will be an update to this issue?

jason-amick avatar Jan 26 '23 18:01 jason-amick

We've released the first couple of preview versions of the PowerShell module.

There is active discussion and development in progress"

  • https://github.com/microsoft/winget-cli/discussions/2796
  • https://github.com/microsoft/winget-cli/pull/2871

denelon avatar Jan 26 '23 18:01 denelon

[Policy] Area-Output

Trenly avatar Jun 16 '23 04:06 Trenly