dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.67k stars 1.06k forks source link

Support Json format for `dotnet new list` #43679

Open MoaidHathot opened 1 week ago

MoaidHathot commented 1 week ago

Is your feature request related to a problem? Please describe.

Calling dotnet new list generates a table-based output. Due to terminal size constraints some values may be automatically truncated, making it very hard for other tools to use the .NET CLI (like a Neovim extension).

Describe the solution you'd like

Support --format json as it already supported in other commands.

Additional context

image

baronfel commented 1 week ago

This is definitely a good thing to do, and very in line with our more recently-created commands. We will likely take a converted stab at making sure there is machine readable output for all of our commands for the next release or two, but if this is especially important to you we'd love to take a PR adding the flag to 'dotnet new list'.

nagilson commented 2 days ago

@MoaidHathot Do you plan on making a PR for this? No pressure of course.. I want to make sure if you did any work already, we don't discount any contribution you might be working on. We are considering picking this task up

MoaidHathot commented 1 day ago

Hi @nagilson, yes, I'm working on a PR. Planning to publish it or a draft of it in the following couple of days.