-
Notifications
You must be signed in to change notification settings - Fork 904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a header row to --limit-output output #2591
Labels
3 - Review
Improvement
Requires Upstream Change
Requires changes to a different location once issue is fixed or implemented
Milestone
Comments
I've got some working code on this, I just need to add some tests then I'll put up a PR for this one. |
corbob
added a commit
to corbob/choco
that referenced
this issue
Oct 13, 2022
When a user asks for limited output from Chocolatey, it is not uncommon to pipe that output to `ConvertFrom-String` or `ConvertFrom-Csv` and manually add headers to get back an object. This allows for getting a header row back so that the end user doesn't need to add their own headers and discern what they are. This also adds a StringResources static class that allows us to store constant strings in and use them across the code to reduce duplication.
9 tasks
corbob
added a commit
to corbob/choco
that referenced
this issue
Oct 13, 2022
When a user asks for limited output from Chocolatey, it is not uncommon to pipe that output to `ConvertFrom-String` or `ConvertFrom-Csv` and manually add headers to get back an object. This allows for getting a header row back so that the end user doesn't need to add their own headers and discern what they are. This also adds a StringResources static class that allows us to store constant strings in and use them across the code to reduce duplication.
corbob
added
the
Requires Upstream Change
Requires changes to a different location once issue is fixed or implemented
label
Oct 14, 2022
pauby
changed the title
add a header row to --limit-output output
Add a header row to --limit-output output
Mar 16, 2023
corbob
added a commit
to corbob/choco
that referenced
this issue
Mar 6, 2024
When a user asks for limited output from Chocolatey, it is not uncommon to pipe that output to `ConvertFrom-String` or `ConvertFrom-Csv` and manually add headers to get back an object. This allows for getting a header row back so that the end user doesn't need to add their own headers and discern what they are. This also adds a StringResources static class that allows us to store constant strings in and use them across the code to reduce duplication.
gep13
pushed a commit
to corbob/choco
that referenced
this issue
Jun 21, 2024
When a user asks for limited output from Chocolatey, it is not uncommon to pipe that output to `ConvertFrom-String` or `ConvertFrom-Csv` and manually add headers to get back an object. This allows for getting a header row back so that the end user doesn't need to add their own headers and discern what they are. This also adds a StringResources static class that allows us to store constant strings in and use them across the code to reduce duplication.
gep13
pushed a commit
to gep13/choco
that referenced
this issue
Jun 21, 2024
When a user asks for limited output from Chocolatey, it is not uncommon to pipe that output to `ConvertFrom-String` or `ConvertFrom-Csv` and manually add headers to get back an object. This allows for getting a header row back so that the end user doesn't need to add their own headers and discern what they are. This also adds a StringResources static class that allows us to store constant strings in and use them across the code to reduce duplication.
gep13
pushed a commit
to gep13/choco
that referenced
this issue
Jul 14, 2024
When a user asks for limited output from Chocolatey, it is not uncommon to pipe that output to `ConvertFrom-String` or `ConvertFrom-Csv` and manually add headers to get back an object. This allows for getting a header row back so that the end user doesn't need to add their own headers and discern what they are. This also adds a StringResources static class that allows us to store constant strings in and use them across the code to reduce duplication.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3 - Review
Improvement
Requires Upstream Change
Requires changes to a different location once issue is fixed or implemented
When you use
--limit-output
or-r
you can pipe the output toConvertFrom-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:to (something like):
In order to make this change in a way to not break existing scripts/workflows, I would suggest adding a feature
showHeaderOnLimitOutput
that defaults to disabled with the possibility of defaulting it to enabled in a future version.The text was updated successfully, but these errors were encountered: